//
//  CHNavigationController.m
//  SZTZ
//
//  Created by 陈浩 on 2017/3/6.
//  Copyright © 2017年 陈浩. All rights reserved.
//

#import "CHNavigationController.h"

@interface CHNavigationController ()

@end

@implementation CHNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
   
   // 设置导航栏属性
    [self setUpNavigationBarAppearance];
    
    
    
}


#pragma mark - Public Method
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
////    [self setUpNavigationBarAppearance];
//    
//    if (self.viewControllers.count > 0) {
//        viewController.hidesBottomBarWhenPushed = YES;
////        viewController.fd_interactivePopMaxAllowedInitialDistanceToLeftEdge = CGRectGetWidth([UIScreen mainScreen].bounds)/3;
////        [self setUpCustomNavigationBarWithViewController:viewController];
//    }
    [super pushViewController:viewController animated:YES];
}


#pragma mark - 设置全局的导航栏属性
- (void)setUpNavigationBarAppearance
{
    UINavigationBar *navigationBarAppearance = [UINavigationBar appearance];
    NSDictionary *textAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
    [navigationBarAppearance setTitleTextAttributes:textAttributes];
    navigationBarAppearance.tintColor = [UIColor whiteColor];
    [navigationBarAppearance setBackgroundImage:[UIImage imageNamed:@"nav_bg"] forBarMetrics:UIBarMetricsDefault];
//    navigationBarAppearance.barTintColor = SetColor(80, 189, 203);
}


#pragma mark - UIStatusBar
- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}
@end
